#include<iostream>
using namespace std;
void shellsort(int* a,int n)
{	
	int gap = n;
	while (gap > 1)
	{	
		gap /= 2;
		for (int i = 0; i < n - gap; i++)
		{
			int end = i;
			int tmp = a[end + gap];
			while (end >= 0)
			{
				if (tmp < a[end])
				{
					a[i + gap] = a[end];
					end -= gap;
				}
				else
				{
					break;
				}
			}
			a[end + gap] = tmp;
		}
	}

}
int main()
{	
	int a[10] = {0};
	for (int i = 0; i < sizeof(a) / sizeof(int); i++)
	{
		cin >> a[i];
	}
	shellsort(a, sizeof(a) / sizeof(int));
	for (int i = 0; i < sizeof(a) / sizeof(int); i++)
	{
		cout << a[i] << " ";
	}
	return 0;
}